package server.jdbc;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import server.utils.AppFile;




public class TestJDBC {
    
    public static void main(String[]args){
        
    	File f = new File(System.getProperty("user.dir"));
		String path = f.getPath() + File.separator + "src" + File.separator
				+ "main" + File.separator + "resources"+File.separator+"config";
		AppFile.path=path;
		System.out.println(AppFile.getJdbcConfig());
    	
        DAOUtil dao = DAOUtil.getInstance();
        
        String sql = "select * from user where account= ?";
        
        List list = new ArrayList();
        
        list.add("hh");
        
        try {
            
        	List i = dao.query(sql, list);
            Map map = (Map)i.get(0);
            System.out.println("i======================>"+i);
        } catch (JDBCException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}
